package cn.yunyichina.provider.reservation.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import cn.yunyichina.provider.framework.annotation.MyBatisRepository;
import cn.yunyichina.provider.framework.mvc.dao.BaseDao;
import cn.yunyichina.provider.framework.page.PageInfo;
import cn.yunyichina.provider.reservation.entity.Item;

/**
*
* @Author auto_gen_by_tool
* @CreatedTime 2016-08-26 09:48:44
*/
@Repository
@MyBatisRepository
public interface ItemDao extends BaseDao<cn.yunyichina.provider.reservation.entity.Item>{
	List<Item> selectForUser(@Param("wheres") Item wheres, @Param("selects") List<String> selects, @Param("orderColumns") List<String> orderColumns, @Param("isAsc") Boolean isAsc, @Param("pageInfo") PageInfo pageInfo);

    List<Item> selectForUser(@Param("wheres") Item wheres, @Param("selects") List<String> selects, @Param("orderColumns") List<String> orderColumns, @Param("isAsc") Boolean isAsc);

    List<Item> selectForUser(@Param("wheres") Item wheres, @Param("orderColumns") List<String> orderColumns, @Param("isAsc") Boolean isAsc);

    List<Item> selectForUser(@Param("wheres") Item wheres, @Param("orderColumns") List<String> orderColumns, @Param("isAsc") Boolean isAsc, @Param("pageInfo") PageInfo pageInfo);

    List<Item> selectForUser(@Param("wheres") Item wheres, @Param("pageInfo") PageInfo pageInfo);

    List<Item> selectForUser(@Param("wheres") Item wheres, @Param("selects") List<String> selects);

    List<Item> selectForUser(@Param("wheres") Item wheres);

    List<Item> selectForUser();
    
    public void changeItemStatus(Item item);
    /**
     * 增加一个已经销售数量
     * @param id
     */
    public void incSaledCount(@Param("id") String id);
    
    /**
     * 减少一个已经销售数量
     * @param id
     */
    public void decSaledCount(@Param("id") String id);
}